package com.snow.storeapi.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.snow.storeapi.entity.Field;
import com.snow.storeapi.service.IFieldService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/pe")
public class PEController {

    private static final Logger logger = LoggerFactory.getLogger(VipController.class);

    @Autowired
    private IFieldService fieldService;

    @GetMapping("/field")
    public List<Field> field() {
        List<Field> fields = fieldService.list(new QueryWrapper<Field>().
                eq("use_state", "1").eq("Interfacetype_Code", "DiagnosisManage8120").orderByAsc("order_no"));
        return fields;
    }
}
